<?php
/**
 * @desc   Created by PhpStorm.
 * @author laowng
 * @since  2018/10/23 14:41
 */

namespace app\admin\model;


use think\Model;

// 角色表
class AdminRoleModel extends Model
{
    protected $table = 'admin_role';// 表名字
    protected $pk = 'role_id'; // 主键

    /**
     * @param $role_id
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function roleAuthIds($role_id)
    {
        $data = (new AdminRoleModel)->where('role_id', $role_id)->field('role_auth_ids')->find();
        return $data['role_auth_ids'];

    }
}